package com.shop.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shop.dao.TFoodMapper;
import com.shop.entity.TFood;
import com.shop.service.TFoodService;

@Service(value = "tFoodService")
public class TFoodServiceImpl implements TFoodService {

    @Autowired
    private TFoodMapper<TFood>tFoodMapper;
    
    @Override
    public Integer insertSelective(TFood tFood) throws Exception {
           return this.tFoodMapper.insertSelective(tFood);
        }

    @Override
    public Integer insertBatch(List<TFood> tFood) throws Exception {
           return this.tFoodMapper.insertBatch(tFood) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tFoodMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tFoodMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(TFood tFood) {
           return this.tFoodMapper.updateByPrimaryKeySelective(tFood);
    }

    @Override
    public TFood findById(Object id) {
           return (TFood) this.tFoodMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<TFood> selectByCondition(TFood tFood) {
           return (List<TFood>) this.tFoodMapper.selectByCondition(tFood);
    }

    @Override
    public Integer selectCountByCondition(TFood tFood) {
           return  this.tFoodMapper.selectCountByCondition(tFood);
    }

}
